unit Unit_MDIBase;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, StdActns, ActnList, ExtCtrls, Buttons, ToolWin, ComCtrls,
  Grids, DBGrids, StdCtrls;

type
  TDisplayStatus=(ndsNormal,ndsEdit);

  Tfrm_MDIBase = class(TForm)
    PopupMenu: TPopupMenu;
    SelectAll: TMenuItem;
    N1: TMenuItem;
    Cut: TMenuItem;
    Copy: TMenuItem;
    Paste: TMenuItem;
    Delete: TMenuItem;
    Undo: TMenuItem;
    ControlBar: TControlBar;
    ToolBar1: TToolBar;
    btnLast: TSpeedButton;
    btnNext: TSpeedButton;
    btnPrior: TSpeedButton;
    btnFirst: TSpeedButton;
    ActionList: TActionList;
    EditCut: TEditCut;
    EditCopy: TEditCopy;
    EditPaste: TEditPaste;
    EditSelectAll: TEditSelectAll;
    EditUndo: TEditUndo;
    EditDelete: TEditDelete;
    ActionFirst: TAction;
    ActionPrior: TAction;
    ActionNext: TAction;
    ActionLast: TAction;
    ActionAdd: TAction;
    ActionDelete: TAction;
    ActionSave: TAction;
    ActionCancel: TAction;
    ActionClose: TAction;
    ToolBar3: TToolBar;
    Memo1: TMemo;
    SpeedButton3: TSpeedButton;
    Label38: TLabel;
    ToolBar4: TToolBar;
    btnClose: TSpeedButton;
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure ActionCloseExecute(Sender: TObject);
    procedure FormResize(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frm_MDIBase: Tfrm_MDIBase;

implementation

uses Unit_Main;

{$R *.dfm}

procedure Tfrm_MDIBase.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key=#13 then
    SelectNext(ActiveControl,True,True);
end;

procedure Tfrm_MDIBase.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action:=caFree;
end;

procedure Tfrm_MDIBase.ActionCloseExecute(Sender: TObject);
begin
  Close;
end;

procedure Tfrm_MDIBase.FormResize(Sender: TObject);
begin
  ToolBar4.Left:=frm_Main.Width-ToolBar4.Width;
  ToolBar3.Left:=ToolBar4.Left-ToolBar3.Width;
  Label38.Left:=ToolBar3.Left-Label38.Width;
end;

end.
